#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int i = 0;
	int a = 0;
	int b = 0;
	int c = 0;
	int d = 0;
	for (i = 100; i <= 1000; i++)
	{
		if (i % 5 == 0)
		{
			a = i / 100;
			b = i % 100;
			c = b / 10;
			d = a % 10;
		}
		if (a + b + c == 9)
		{
			printf("%d ", i);
		}
	}
	return 0;

}